package org.example.innovate.service;

import jakarta.servlet.http.HttpServletRequest;
import org.example.innovate.domain.User;
import org.example.innovate.dto.PageDTO;
import org.codehaus.jettison.json.JSONException;
import org.example.innovate.common.CommonResponse;
import org.example.innovate.domain.Dish;
import com.baomidou.mybatisplus.extension.service.IService;
import org.example.innovate.vo.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.multipart.MultipartFile;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.List;

/**
* @author 马鑫
* @description 针对表【dish】的数据库操作Service
* @createDate 2024-12-28 22:32:27
*/
public interface DishService extends IService<Dish> {
    public CommonResponse<String> updateData() throws JSONException;
    public CommonResponse<DishVo> getHotDish(PageDTO page) throws JSONException;
    CommonResponse<DishVo> getPersonDish(PageDTO page,HttpServletRequest request) throws JSONException;
    public CommonResponse<DishBodyVo> getdishBody(Dish dish,HttpServletRequest request) throws IOException;
    public CommonResponse<List<DishOneVo>> search(String content,HttpServletRequest request) throws IOException;
    public CommonResponse<List<DishOneVo>> getCategory(String category);
    public CommonResponse<uploadVo> upload(List<MultipartFile> image,uploadVo up, String token) throws IOException;
    public CommonResponse<DishVo> getDishByUserId(Integer userId,PageDTO pageDTO);
    CommonResponse<BackVo> setBack(BackVo backVo,HttpServletRequest request) throws IOException;
    CommonResponse<User> updateUser() throws IOException, JSONException;
    CommonResponse<Integer> repair();
}
